<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml"
      lang="en_US"
      xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <link rel="stylesheet" href="/css/index.css">
    <title>Spring Boot starter</title>
</head>
<body>

<div th:text="#{tip}">

</div>

<div th:text="${app}">

</div>

<div>
    appid - <span th:text="${appID}"></span> <br>
</div>


<div th:text="${query}">

</div>

<h1>Spring Boot starter</h1>

<h3>hello world!</h3>

<button id="ajax">ajax</button>
<script src="https://cdn.bootcdn.net/ajax/libs/jquery/3.5.1/jquery.min.js"></script>
<script type="text">
    var d = {
        id : 1, userName : "huahua", passWord: '123' , realName: 'zyh'
    }
    $("#ajax").on("click", function () {
        $.post({
            url: '/test4',
            contentType: "application/json",
            data: JSON.stringify(d),
            success: function (e) {
                console.log(e);
            }
        })
    })


    let f = new FormData();
    f.append("date", "2020-11-11")

    setTimeout(() => {
        $.post({
            url: '/test5',
            contentType: false,
            processData: false,
            data: f,
            success: function (e) {
                console.log(e);
            }
        })
    }, 4000)

</script>


<div th:include="layout/footer"></div>

</body>
</html>